package cn.yunhe.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

import cn.yunhe.controller.WordAction;

public class WordInterceptor extends AbstractInterceptor {

	private static final long serialVersionUID = 1L;

	public String intercept(ActionInvocation invocation) throws Exception {
		WordAction wa = (WordAction) invocation.getAction();
		if(wa.getTitle().indexOf("妈的") != -1 || wa.getContext().indexOf("妈的") != -1){
			return "input";
		}
		return invocation.invoke();
	}

}
